<p>When a new note is created, its name is by default "new note". In some
  cases, it can be desirable to have a different or even a dynamic default
  note title.</p>
<p>For this use case, Trilium (since v0.52) supports <code>#titleTemplate</code> 
  <a
  href="#root/_help_zEY4DaJG4YT5">label</a>. You can create such a label for a given note, assign it a value,
    and this value will be used as a default title when creating child notes.
    As with other labels, you can make it inheritable to apply recursively,
    and you can even place it on the root note to have it applied globally
    everywhere.</p>
<p>As an example use case, imagine you collect books you've read in a given
  year like this:</p>
<ul>
  <li>2022 Books
    <ul>
      <li>Neal Stephenson: Anathem, 2008</li>
      <li>Franz Kafka: Die Verwandlung, 1915</li>
    </ul>
  </li>
</ul>
<p>Now, to the parent note "2022 Books" you can assign label <code>#titleTemplate="[Author name]: [Book title], [Publication year]"</code>.</p>
<p>And all children of "2022 Books" will be created with initial title "[Author
  name]: [Book title], [Publication year]". There's no artificial intelligence
  here, the idea is to just prompt you to manually fill in the pieces of
  information into the note title by yourself.</p>
<h2>Dynamic value</h2>
<p>The value of <code>#titleTemplate</code> is evaluated at the point of note's
  creation as a JavaScript string, which means it can be enriched with the
  help of JS string interpolation with dynamic data.</p>
<p>Second variable injected is <code>parentNote</code> which gives access to
  the parent <a href="#root/_help_habiZ3HU8Kw8"><code>FNote</code></a>.</p>
<p>See also&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;which
  provides similar capabilities, including default note's content.</p>
<h3>Examples</h3>
<ul>
  <li>Imagine you collect server outage incidents and write some notes. It looks
    like this:
    <ul>
      <li>Incidents
        <ul>
          <li>2022-05-09: System crash</li>
          <li>2022-05-15: Backup delay</li>
        </ul>
      </li>
      <li>You can automatize the date assignment by assigning a label <code>#titleTemplate="${now.format('YYYY-MM-DD')}: "</code> to
        the parent note "Incidents". Whenever a new child note is created, the
        title template is evaluated with the injected <a href="https://day.js.org/docs/en/display/format">now</a> object.</li>
    </ul>
  </li>
  <li>To use a parent's attribute in the title of new notes: <code>#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"</code>
  </li>
  <li>To mirror the parent's note title: <code>${parentNote.title}</code>
  </li>
</ul>